<template>
  <div class="content">
    <!-- 提示信息 -->
    <div>
      <el-dialog title="分享到朋友圈" v-model="dialogVisible" width="306px">
        <div class="qrcode">
          <img src="../assets/weixin01.png" alt="">
        </div>
        <div class="tr">
          <p>打开微信，点击底部的“发现”</p>
          <p>使用“扫一扫”即可将网页分享至朋友圈</p>
        </div>
      </el-dialog>
    </div>

    <!-- 面包屑 -->
    <div class="navbar">
      <el-breadcrumb separator-icon="ArrowRight" class="el-breadcrumb">
        <el-breadcrumb-item :to="{ path: '/index' }" class="f-c-c el-breadcrumb-item">首页</el-breadcrumb-item>
        <el-breadcrumb-item class="f-c-c el-breadcrumb-item">随便</el-breadcrumb-item>
      </el-breadcrumb>
    </div>

    <!-- 整体布局 -->
    <div class="f-sb">
      <!-- 左边布局 -->
      <div class="new-left">
        <!-- 上方视频 -->
        <div style="width:830px;height:468px;">
          <my-video v-if="arrylist.video" :videoSrc="'/api'+arrylist.video" :videoImg="'/api'+arrylist.image"></my-video>
          <div class="video-text f-c">
            <span> | 发布时间: {{arrylist.updateTime}}</span>
          </div>
        </div>
        <!-- 下方日期和来源 -->
        <div class="title">{{ arrylist.title }}</div>
        <div class="publisher">
          {{ arrylist.updateTime + ' 来源: ' + arrylist.source }}
          <img src="../assets/weixin-23.png" alt="" class="img1" @click="palaton">
        </div>
      </div>
      <!-- 右边布局 -->
      <div class="new-right">
        <div>
          <div class="account-item">
            <div class="account-icon f-c-c">
              <img src="../assets/logo.png" alt="" style="width:80%">
            </div>
            <div class="account-name f-c-c">福建教育网</div>
            <div class="account-text f-c-c">福建教育电视台主办</div>
          </div>
        </div>
      </div>
    </div>

  </div>
</template>

<script>
import { getNavigationById } from '../api/index'
import MyVideo from '../components/my-video.vue'
export default {
  data() {
    return {
      title_text: {},
      dialogVisible: false,
      arrylist: {},
      videoDate: {
        video: ''
      }
    }
  },
  created() {
    this.$toTop()
    let id = this.$route.query.tid
    // 拿到id然后根据id和url头的进行请求
    getNavigationById({ tid: id }).then(async res => {
      this.arrylist = await res.data

    })
  },
  components: {
    MyVideo
  },
  updated() {
    this.$toTop()
  }
}
</script>

<style lang="less" scoped>
.content {
  width: 1200px;
  margin: 0 auto;
}


// 面包屑设计
.navbar {
  margin: 20px 0 16px 0;
  display: flex;
  height: 30px;

  .el-breadcrumb {
    background-color: #f8f8f8;
    padding: 0 10px;

    .el-breadcrumb-item {
      float: left;
      height: 100%;
    }

  }


}

.new-right {
  width: 350px;

  .account-item {
    width: 309px;
    margin: a auto;
    padding: 26px 0;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid rgba(114, 124, 139, 0.1);

    .account-icon {
      width: 85px;
      height: 85px;
      margin: 0 auto 16px auto;
      border-radius: 50%;
      background-color: #fff;
      border: 1px solid #eeeeee;
    }

    .account-name {
      font-size: 18px;
      font-weight: bold;
      font-stretch: normal;
      line-height: 22px;
      letter-spacing: 0;
      color: black;
    }

    .account-text {
      font-size: 14px;
      line-height: 45px;
      letter-spacing: 0;
      color: #666666
    }

  }
}

.new-left {
  width: 830px;

  .video-text{
    margin-top: -4px;
    height: 45px;
    color: #747e8c;
    background: #1f1d20;
    font-family: NotoSansHans-Regular;
    font-size: 12px;
    font-weight: normal;
    font-stretch: normal;
    letter-spacing: 0px;
    color: #747e8c;
    span{
      margin-left: 25px;
    }
  }
  .title {
    margin-top: 41px;
    font-size: 20px;
    font-weight: bold;
    font-stretch: normal;
    line-height: 40px;
    letter-spacing: 0;
    color: black;
  }

  .publisher {
    font-size: 14px;
    font-weight: normal;
    font-stretch: normal;
    line-height: 22px;
    letter-spacing: 0;
    color: #666666;
    position: relative;

    .img1 {
      position: absolute;
      ;
      right: 20px;
      width: 25px;
      height: auto;
      top: calc(~'50% - 13px');
    }
  }
}
</style>